package com.jshare.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.jshare.entity.*;
import com.jshare.service.*;
import com.jshare.tiezi.use.fenye.PageInfo;
import com.jshare.util.Pager;

public class HomeAction extends ActionSupport {

	private List<Detool> detools;
	private PageBean articles;
	private List<Tiezi> tiezis;
	private Pager newsPager;
	private PageInfo tieziPage;
	private DetoolService detoolService;
	private ArticleServive articleService;
	private TieziService tieziService;
	private NewsService newsService;
	public String execute()
	{
		
		detools = detoolService.getListByPage(1, 8);
		articles = articleService.queryForPage(8, 1);
		newsPager = newsService.getPageData(8, 1);
		tieziPage = tieziService.getAllTiesByFenye(1, 8, "form Tiezi t"); 
		return "success";
	}
	public List<Detool> getDetools() {
		return detools;
	}
	public void setDetools(List<Detool> detools) {
		this.detools = detools;
	}
	
	public List<Tiezi> getTiezis() {
		return tiezis;
	}
	public void setTiezis(List<Tiezi> tiezis) {
		this.tiezis = tiezis;
	}
	
	public DetoolService getDetoolService() {
		return detoolService;
	}
	public void setDetoolService(DetoolService detoolService) {
		this.detoolService = detoolService;
	}
	public ArticleServive getArticleService() {
		return articleService;
	}
	public void setArticleService(ArticleServive articleService) {
		this.articleService = articleService;
	}
	public TieziService getTieziService() {
		return tieziService;
	}
	public void setTieziService(TieziService tieziService) {
		this.tieziService = tieziService;
	}
	public NewsService getNewsService() {
		return newsService;
	}
	public void setNewsService(NewsService newsService) {
		this.newsService = newsService;
	}
	public PageBean getArticles() {
		return articles;
	}
	public void setArticles(PageBean articles) {
		this.articles = articles;
	}
	public Pager getNewsPager() {
		return newsPager;
	}
	public void setNewsPager(Pager newsPager) {
		this.newsPager = newsPager;
	}
	public PageInfo getTieziPage() {
		return tieziPage;
	}
	public void setTieziPage(PageInfo tieziPage) {
		this.tieziPage = tieziPage;
	}
	
}
